package com.esri.core.internal.tasks.oauth;

import com.esri.core.internal.io.handler.h;
import com.esri.core.internal.io.handler.n;
import com.esri.core.internal.tasks.TaskListener;
import com.sangfor.ssl.service.utils.IGeneral;
import org.codehaus.jackson.JsonParser;

/* loaded from: classes.dex */
public class c extends com.esri.core.internal.tasks.d<e> {
    private static final long serialVersionUID = 1;

    public c(d dVar, String str) {
        super(dVar, a(str), null);
    }

    public c(d dVar, String str, TaskListener<e> taskListener) {
        super(dVar, a(str), null, taskListener);
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: a */
    public e execute() throws Exception {
        JsonParser a = h.a(getServiceURL(), this.actionInput.generateRequestParams(), false, (n) null);
        e eVar = new e(a);
        a.close();
        return eVar;
    }

    private static String a(String str) {
        return str.contains(IGeneral.PROTO_HTTP_HEAD) ? str.replace(IGeneral.PROTO_HTTP_HEAD, IGeneral.PROTO_HTTPS_HEAD) : str;
    }
}
